import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static String fun(double n, int m) {
        String s = "%." + String.valueOf(m) + "f";
        return String.format(s, n);
    }

    public static boolean isPrime(int n) {
        if (n <= 1) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        if (n % 2 == 0) {
            return false;
        }
        for (int i = 3; i <= Math.sqrt(n); i+=2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static int binarySearch(List<Integer> list,int target){
        //第一个大于target的元素的下标
        int left = 0;
        int right = list.size()-1;
        int mid;
        int ans = 0;
        while(left<=right){
            mid = left + (right - left) /2;
            int cur = list.get(mid);
            if(cur>=target){
                ans = mid;
                right = mid-1;
            }else{
                left = mid+1;
            }
        }
        return ans;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = 10;
        List<Integer> list = new ArrayList<>();
        for(int i=0;i<n-1;i++){
            int tmp = scanner.nextInt();
            list.add(tmp);
        }
        int target = scanner.nextInt();
        int index = binarySearch(list, target);
        list.add(index, target);
        for(int i=0;i<list.size();i++){
            System.out.println(list.get(i));
        }
    }
}